﻿using System;
using Eamon.MeituanDotnetSDK.api.common;
using Eamon.MeituanDotnetSDK.api.oauth.entity;

namespace Eamon.MeituanDotnetSDK.api.oauth
{
    /// <summary>
    /// https://developer.meituan.com/docs/biz/comm-dev-isv-auth
    /// </summary>
    public class RefreshToken : AbstractAPI<TokenResponse>
    {
        public RefreshToken(RefreshTokenRequest request)
        {
            this.apiRequest = request;
        }

        public override string getHttpUrl()
        {
            return "https://api-open-cater.meituan.com/oauth/refresh";
        }

        public override string getMethod()
        {
            return "oauth.refresh";
        }

        public override Type getRequestClass()
        {
            return typeof(RefreshTokenRequest);
        }
    }
}
